function CRTL_MyFirstChild(oObject, sTag) {
    oFirstChild = oObject.firstChild;
    while (oFirstChild && oFirstChild.nodeName != sTag) {
        oFirstChild = oFirstChild.nextSibling;
    }

    return oFirstChild;
}

function CRTL_MyLastChild(oObject, sTag) {

    oLastChild = oObject.lastChild;
    while (oLastChild && oLastChild.nodeName != sTag) {
        oLastChild = oLastChild.previousSibling;
    }

    return oLastChild;
}

function CRTL_DoOnMouseOver(oObject) {
    if (CRTL_oTimer != null) window.clearTimeout(CRTL_oTimer);
    CRTL_oTimer = null;

    oSubMenu = CRTL_MyLastChild(oObject, 'UL');

    oParent = oObject.parentNode;

    if (oParent) {
        oNode = CRTL_MyFirstChild(oParent, 'LI');
        while (oNode) {
            if (oNode != oObject) {
                oNode.className = null;
            }
            oNode = oNode.nextSibling;
        }
    }
}

var CRTL_oTimer = null;
var CRTL_oDefaultLi = null;

function CRTL_BackToDefault() {
    CRTL_oTimer = null;
    CRTL_oDefaultLi.className = CRTL_oDefaultLi.getAttribute('DefaultClass');
}

function CRTL_DoOnMouseOut(oObject) {
    oParent = window.event ? window.event.toElement : null;
    while (oParent != null) {
        if (oParent == oObject) return false;
        oParent = oParent.parentNode;
    }

    oSubMenu = CRTL_MyLastChild(oObject, 'UL');

    oParent = oObject.parentNode;

    if (oParent) {
        oNode = CRTL_MyFirstChild(oParent, 'LI');
        while (oNode) {
            //	if (oNode != oObject)
            {
                if (oNode.getAttribute('DefaultClass')) {
                    CRTL_oDefaultLi = oNode;

                    if (CRTL_oTimer != null) window.clearTimeout(CRTL_oTimer);
                    CRTL_oTimer = window.setTimeout(CRTL_BackToDefault, 10);
                }
            }
            oNode = oNode.nextSibling;
        }
    }
}